﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="admin.ascx.cs" Inherits="Jungle.Modules.News_Admin" %>
<%@ Register Assembly="Omofor" Namespace="Jungle.Code.News.WebControls" TagPrefix="ONC" %>

<asp:MultiView ID="NewsView" runat="server" ActiveViewIndex="0">

<asp:View ID ="v0" runat="server">
    <strong>
                    <br /><asp:LinkButton ID="btn_AddNews" runat="server" Text="Добавить новость" PostBackUrl="~/Admin/Modules.aspx?mod=News&cmd=add" CssClass="category_funcs_text" ></asp:LinkButton>
                    <br /><asp:LinkButton ID="btn_ViewNews" runat="server" Text="Отобразить список новостей" PostBackUrl="~/Admin/Modules.aspx?mod=News&cmd=view" CssClass="category_funcs_text" ></asp:LinkButton>                    
   </strong>
</asp:View>

<asp:View ID="v1" runat="server">
        <table width="100%" height="100%" cellpadding = "0" cellspacing = "0">
                    <tr>
                        <td width="150px" height="25px"><strong>Заголовок новости:</strong></td>
                        <td><asp:TextBox ID="txt_ProductTitle" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px"><strong>Текст новости:</strong></td>
                        <td><asp:TextBox ID="txt_ProductDesc" runat="server" Height="100px" 
                                TextMode="MultiLine" /></td>
                    </tr>                    
                    <td width="150px" height="25px"><strong>Категория:</strong></td>
                        <td>
                            <asp:DropDownList ID="ddl_NewsCategory" runat="server" ></asp:DropDownList>                               
                        </td>
                    </tr>
                    <tr>
                        <td width="150px"><strong>Изображение:</strong></td>
                        <td><asp:FileUpload ID="fu_Image" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px">
                        <br />
                        <asp:Button ID="btn_SaveNewsChanges" runat="server" Text="Сохранить изменения" OnClick="SaveChanges"  Visible="false" />
                                
                        <asp:Button ID="btn_AddNewNews" runat="server" Text="Добавить новость" OnClick="AddNews" Visible="false"  />
                        
                        </td>
                        <td>
                        <asp:Label ID="lbl_ResultAddNews" runat="server" Text=""></asp:Label>
                        </td>
                        
                        <td>&nbsp;</td>
                    </tr>
                </table>                
</asp:View>

<asp:View ID="v2" runat="server">
    <ONC:NewsList ID="NewsList1" runat="server" />
</asp:View>
</asp:MultiView>